
var btnSubmit = document.getElementById('btnSubmit');


btnSubmit.onclick = function (){ // 异步函数
    var username= document.getElementById('username').value;
    var password=document.getElementById('password').value;
    var message = document.getElementById('message');

     if(username=='admin'&&password=='123'){
          message.className = 'success';
          message.innerText = '登录成功';
     }else {
         message.className='danger';
         message.innerText = '登录失败';
     }

}